package service;

import entity.ClockRule;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface ClockRuleService {


    List<ClockRule> findAll() throws SQLException, ClassNotFoundException;


    ClockRule findById(Integer id) throws SQLException, ClassNotFoundException;


    boolean save(ClockRule rule) throws SQLException, ClassNotFoundException;

    boolean update(ClockRule rule) throws SQLException, ClassNotFoundException;


    boolean delete(Integer id) throws SQLException, ClassNotFoundException;

    boolean toggleStatus(Integer id, Boolean active) throws SQLException, ClassNotFoundException;

    ClockRule extractRuleFromResultSet(ResultSet rs) throws SQLException;

    boolean isValidCheckInTime(Date checkInTime) throws SQLException, ClassNotFoundException;

}
